package Finance::NSCC::Insurance::Schema::AnnuitizationPayout;

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__->load_components("Core");
__PACKAGE__->table("annuitization_payouts");
__PACKAGE__->add_columns(
  "id",
  { data_type => "INT", default_value => undef, is_nullable => 0, size => 10 },
  "nscc_num",
  { data_type => "CHAR", default_value => "", is_nullable => 0, size => 4 },
  "contract_num",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 30 },
  "annuity_payout_amt",
  { data_type => "DECIMAL", default_value => "", is_nullable => 0, size => 16 },
  "annuity_payment_amt_q",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 3 },
  "annuity_freq_code",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 3 },
  "payout_opt",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 2 },
  "lives_type",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 1 },
  "payout_type",
  { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 1 },
  "certain_period",
  {
    data_type => "SMALLINT",
    default_value => undef,
    is_nullable => 1,
    size => 6,
  },
  "increase_pct",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 10,
  },
  "assumed_interest_rate",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 10,
  },
  "levelization_i",
  { data_type => "TINYINT", default_value => undef, is_nullable => 1, size => 1 },
  "primary_survivor_adj_type",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 1 },
  "primary_survivor_adj_pct",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 10,
  },
  "joint_survivor_adj_type",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 1 },
  "joint_survivor_adj_pct",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 10,
  },
  "exclusion_value_pct",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 16,
  },
  "exclusion_value_dollar",
  {
    data_type => "DECIMAL",
    default_value => undef,
    is_nullable => 1,
    size => 16,
  },
  "exclusion_i",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 2 },
  "certain_period_q",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 3 },
  "liquidity_opt",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 2 },
  "liquidity_waiting_period",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 2 },
  "liquidity_trigger_event",
  { data_type => "VARCHAR", default_value => undef, is_nullable => 1, size => 2 },
  "liquidity_partial",
  { data_type => "TINYINT", default_value => undef, is_nullable => 1, size => 1 },
);
__PACKAGE__->set_primary_key("id");

__PACKAGE__->belongs_to(contract => 'Finance::NSCC::Insurance::Schema::Contract',
                        {
                         'foreign.nscc_num'     => 'self.nscc_num',
                         'foreign.contract_num' => 'self.contract_num',
                        }
                       );

1;
